using UnityEngine;
using QFramework;

namespace QFramework.FlappyBird
{
	public partial class SceneController : ViewController
	{
		void Start()
		{
			// Code Here
			UIKit.Root.SetResolution(720, 1280, 1);
			UIKit.OpenPanel<UIGamePanel>();
			AudioKit.PlayMusic("BACKGROUNDMUSIC");
		}
        private void Update()
        {
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                Application.Quit();
            }
        }

        private void OnDestroy()
        {
            if (!this.gameObject.scene.isLoaded) return;
            UIKit.ClosePanel<UIGamePanel>();
        }
    }
}
